import React from 'react'
import {
    Outlet,
    NavLink,
} from 'react-router-dom'
import {routes} from '../../router/routes.jsx'
import './home.css'
const Home=()=> {
    return (
        <div className='home'>
            <header>宏烨找房后台管理系统</header>
            <main>
                <article>
                    <div className='home_user'>管理员</div>
                    <div className='home_navlink'>
                        {
                            routes[0].children.map((item)=>{
                                return <NavLink key={item.path} to={item.path}>{item.icon}<span>{item.name}</span></NavLink>
                            })
                        }
                        
                    </div>
                </article>
                <div className="right">
                    <div className="right_con">
                        {/* 二级路由出口 */}
                        <Outlet />
                    </div>
                </div>
            </main>
        </div>
    )
}

export default Home
